package com.example.demo1105.demo2;

import java.util.stream.Stream;

public class TestTwo01 {
    public static void main(String[] args) {
        String[] arr1={"a","b","f","d"};
        String[] arr2={"e","f","g","h"};
        Stream<String> stream1 = Stream.of(arr1);
        Stream<String> stream2 = Stream.of(arr2);

        //Stream.concat(stream1,stream2).forEach(System.out ::println);

        //Stream.concat(stream1,stream2).distinct().forEach(System.out ::println);

        //Stream.concat(stream1,stream2).limit(5).forEach(System.out ::println);

        Stream.concat(stream1,stream2).skip(2).forEach(System.out ::println);

    }
}
